package polymorphicTask.Pizza;

public class BaconPizza extends Pizza {
    private int weight;
     public BaconPizza(){}

    public BaconPizza(String name, int price, String size, int weight) {
        super(name, price, size);
        this.weight = weight;
    }

    public int getWeight() {
        return weight;
    }

    public void setWeight(int weight) {
        this.weight = weight;
    }
    public  void show(){
        System.out.println("名称："+this.getName()+"\n价格："+this.getPrice()+"元\n大小："+this.getSize()+"寸\n培根克数："+this.getWeight()+"克");
    }
}
